<%-- 
    Document   : process_entry
    Created on : May 16, 2014, 9:40:40 PM
    Author     : krisada
--%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Process Entry</title>
    </head>
    <body>
        <br/>
        <h2>Process Information</h2>
        <br/>
        <form:form method="POST" action="${mode_action}">
            <form:hidden path="id"/>
            <table>
                <tr>
                    <td><form:label path="processId">Process ID</form:label></td>
                    <td><form:input path="processId" size="30"/></td>
                </tr>
                <tr>
                    <td><form:label path="name">Name</form:label></td>
                    <td><form:input path="name" size="30"/></td>
                </tr>
                <tr>
                    <td><form:label path="description">Description</form:label></td>
                    <td><form:textarea path="description" cols="40" rows="5"/></td>
                </tr>
                <tr>
                    <td colspan="2" align="center">
                        <input type="submit" value="Submit"/>
                    </td>
                </tr>
            </table>  
        </form:form>
        <br/>
        <h3>Activity size:${act_size}</h3>
        <input type="text" name="actName" />
        <button type="submit" name="bSearch2">Search</button>
        <button type="submit" name="bAdd2" formaction="activityEntry.htm">Add</button>
        <br/>
        <table style="border-width: 1px; border-style: groove">
            <tr>
                <th>Activity ID</th>
                <th>Name</th>
                <th>Description</th>
                <th>&nbsp;</th>
                <th>&nbsp;</th>
            </tr>
            <c:forEach items="${activities}" var="item">
                <tr>
                    <td>${item.activityId}</td>
                    <td>${item.name}</td>
                    <td>${item.description}</td>
                    <td><a href="findProcess.htm?id=${item.id}"><img src="${pageContext.request.servletContext.contextPath}/imgs/edit.png"/></a></td>
                    <td><a href="javascript:void(0)" onClick=""><img src="${pageContext.request.servletContext.contextPath}/imgs/delete.png"/></a></td>
                </tr>
            </c:forEach>
        </table>

    </body>
</html>
